using System;
using System.Collections.Generic;
using System.Collections;


namespace Nhibernate
{
    public class SearchCriteria
    {
        private List<SearchObj> searchObj = new List<SearchObj>();
        private Type searchClass;
        private int soBanGhi;
        private string orderAtts;
        private string orderOpers;
        public int SoBanGhi
        {
            get { return soBanGhi; }
            set { soBanGhi = value; }
        }
        public Type SearchClass
        {
            get { return searchClass; }
            set { searchClass = value; }
        }
        public SearchCriteria(Type _sClass)
        {
            this.searchClass = _sClass;
        }
        public void addSearchItem(SearchObj sObj)  {
            if (sObj.Name != null)
            {
                searchObj.Add(sObj);
		    }
		    else {
			    throw new NullReferenceException("Name is null!");
		    }
	    }
        public List<SearchObj> SearchObj
        {
            get { return searchObj; }
            set { searchObj = value; }
        }

        public string OrderAtts
        {
            get { return orderAtts; }
            set { orderAtts = value; }
        }

        public string OrderOpers
        {
            get { return orderOpers; }
            set { orderOpers = value; }
        }
    }
}
